package test 
{
	import flash.geom.Rectangle;
	import flash.system.ApplicationDomain;
	import lynch.display.Scale9Image;
	import lynch.display.Window;
	import lynch.net.loading.ResourceLoader;
	import starling.core.Starling;
	import starling.display.Sprite;
	
	/**
	 * ...
	 * @author 小痛
	 */
	public class ScaleTest extends Sprite 
	{
		public function ScaleTest() 
		{
			super();
			
			ResourceLoader.loadImgs(Vector.<String>(["resource/image/scale9gride.png"]), onImageComplate);
		}
		
		private function onImageComplate(data:Array):void 
		{
			//var image:Scale9Image = new Scale9Image(500, 500, 
				//new Rectangle(10, 10, 60, 60), { width:500, height:500 } );
			//image.updateTexture(1000, 200);
			
			Window.BG_IMG_BIMAPDATA = data[0].bitmapData;
			Window.BG_IMG_9GRID = new Rectangle(10, 10, 60, 60);
			
			var window:Window = new Window(500, 500); 
			window.dragEnabled = true;
			Starling.current.stage.addChild(window);
			
			ApplicationDomain.currentDomain
		}
	}
}